﻿@model IEnumerable<Quiz.Model.AnswerSet>

@{
    ViewBag.Title = "AnswerSet for " + Session["QuestionID"];
    ViewBag.Menu = "Play.Index";
}
<style>
    .hidden {
        display:none;
    }
</style>
<style>
   table {
         padding:0;
        margin:0;
    }
    th {
        border:2px solid #445566;
        padding:0;
        margin:0;
    }
    td {
        border:1px solid #778899;
         padding:0;
        margin:0;
    }
</style>

<p>
    @Html.ActionLink("Add Answer", "Create",null,new { @class="ui-btn-up-c", style="padding:10px;"})
</p>
<table>
    <tr>
        <th class="hidden">
            @Html.DisplayNameFor(model => model.QuestionID)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Position)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Text)
        </th>
        <th>Edit</th>
        <th>Delete</th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td class="hidden">
            @Html.DisplayFor(modelItem => item.QuestionID)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Position)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Text)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.AnswerSetID }) 
         
        </td>
        <td>
   @Html.ActionLink("Delete", "Delete", new { id=item.AnswerSetID })
        </td>
    </tr>
}

</table>
<br />
   @Html.ActionLink("Go To Question", "Edit", "Play", new { id = Session["QuestionID"] }, new { @class="ui-btn-up-c", style="padding:10px;"})